<%@include file="inc/prelude.jsp" %>
<div id="wrapper">
    <%@include file="inc/header.jsp" %>
    <%@include file="inc/menu.jsp" %>
    <div id="content">
        <div class="content-left">
            <s:set var="lenBank" value="%{listBank.size()}"/>
            <c:if test="${lenBank>0}">
                <div>
                    <table border="0" width="100%" cellpadding="0" cellspacing="0" class="jobs_menu">
                        <tbody><tr>
                                <td style="text-align: left;"><a class="jobs_menu_active">&nbsp;&nbsp;Step 1</a></td>
                                <td style="text-align: left;"><a>&nbsp;&nbsp;Step 2</a></td>
                                <td style="text-align: left;"><a>&nbsp;&nbsp;Step 3</a></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </c:if>
            <div id="table-mess">
                <div class="mess">
                    <div class="mess-title"><img alt=""  src="${pageContext.request.contextPath}/res/images/star.png" border="0">Withdraw Money</div>
                        <c:choose>
                            <c:when test="${lenBank == 0}">
                            <div class="submit-card-left"></div>
                            <div>
                                <a href="${pageContext.request.contextPath}/user/manage_bank.htm" class="green">
                                    <s:text name="user.withdraw.regBank" />
                                </a>
                                <br/>
                            </div>
                        </c:when>
                        <c:otherwise>
                            <form name="withdraw_form" action="/user/withdraw-confirm.htm" method="POST">
                                <div></div>
                                <div class="mess-content">
                                    <s:actionerror />
                                    <p></p>
                                    <p><s:text name="user.withdraw.select_bank" /></p>
                                </div>
                                <c:forEach items="${listBank}" var="bank">
                                    <c:if test="${bank.active=='yes'}">
                                        <div class="submit-card-left">
                                            <input type="radio" name="bank_id" id="withdraw_bank_id" value="${bank.id}">
                                        </div>
                                        <div class="submit-card-right">${bank.bankName} ${bank.accountNumberHidden}
                                            <br>
                                        </div>
                                    </c:if>
                                    <c:if test="${bank.active!='yes'}">
                                        <div class="submit-card-left">
                                            <input type="radio" name="bank_id" id="withdraw_bank_id" value="${bank.id}" disabled ="disabled">
                                        </div>
                                        <div class="submit-card-right">${bank.bankName} ${bank.accountNumberHidden}
                                            <a href="${pageContext.request.contextPath}/user/manage_bank.htm" class="green">[Verify]</a><br>
                                        </div>
                                    </c:if>
                                    <div class="clearboth"></div>
                                </c:forEach>
                                <br>
                                <div class="submit-card-left">Amount:</div>
                                <div class="submit-card-right">
                                    <input type="text" name="amount" id="withdraw_form_amount" value="">
                                </div>
                                <div class="clearboth"></div>
                                <div class="submit-card-left">Currency:</div>
                                <div class="submit-card-right">
                                    <select name="currency">
                                        <c:forEach items="${currencies}" var="curr">
                                            <option value="${curr.id}">${curr.symbol}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                <div class="clearboth"></div>
                                <div class="submit-card-left">&nbsp;</div>
                                <div class="submit-card-right submit-card-button">
                                    <button type="submit">Next</button>
                                    <button onclick="document.location='/user/summary.htm';return false;">Cancel</button>
                                </div>
                                <div class="clearboth"></div>
                            </form>
                        </c:otherwise>
                    </c:choose>
                </div>
            </div>
            <%@include file="inc/quicklink.jsp" %>
        </div>
        <%@include file="inc/rightmenu.jsp" %>
    </div>
    <%@include file="inc/footer.jsp" %>
</div>
<%@include file="inc/coda.jsp" %>